from xadmin.lib.crprassociation import CRPRAssociation
from xadmin.lib.prprodassociation import PRPRODAssociation
from xadmin.lib.crprprodassociation import CRPRPRODAssociation

class AssociationFactory(object):
    def getAssociation(self, type):
        if type == 'crpr':
            return CRPRAssociation()
        elif type == 'prprod':
            return PRPRODAssociation()
        elif type == 'crprprod':
            return CRPRPRODAssociation()
        else:
            return None